package rz.spring.proxy;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class AdviceDemo {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		/*ApplicationContext context = new ClassPathXmlApplicationContext(
				"spring/proxy/spring_test.xml");
		MessagePrint print = (MessagePrint) context.getBean("messagePrint");
		print.printMsg("Hello World!");*/
		
		ApplicationContext context2 = new ClassPathXmlApplicationContext(
		"spring/proxy/spring_a.xml");
		MessagePrint print2 = (MessagePrint) context2.getBean("messagePrintImpl");
		print2.printMsg("HUHUHU");
		System.out.println("--------------------------------");
		print2 = (MessagePrint) context2.getBean("messagePrint");
		print2.printMsg("UUUUU");
	}

}
